﻿using System.Globalization;
using System.Threading;
using System.Windows;

namespace Odebrecht.WpfApplication
{
    public partial class App : Application
    {
        #region Methods

        private void Application_Startup(object sender, StartupEventArgs e)
        {
            var dtinfo = new DateTimeFormatInfo();
            dtinfo.ShortDatePattern = "MM/dd/yyyy";
            dtinfo.LongDatePattern = "ddd MM/dd/yyyy";
            dtinfo.DateSeparator = "/";

            var cultureInfo = new CultureInfo("pt-BR");
            cultureInfo.DateTimeFormat = dtinfo;

            var cult2 = CultureInfo.CreateSpecificCulture("pt-BR");
            cult2.DateTimeFormat.DateSeparator = "/";
            cult2.DateTimeFormat.LongDatePattern = "ddd MM/dd/yyyy";
            Thread.CurrentThread.CurrentCulture = cult2;

            Thread.CurrentThread.CurrentUICulture = cultureInfo;
        }

        #endregion Methods
    }
}